package com.yenlien.traceyun.business.dao;

import com.yenlien.traceyun.business.entity.Detection;
import com.yenlien.traceyun.webase.dao.BaseJpaDao;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface DetectionDao extends BaseJpaDao<Detection> {

    Detection findById(String id);

    List<Detection> findByRelevanceId(String relevanceId);

    @Query(value = "SELECT * FROM t_plant_detection WHERE relevance_id IN (?1)", nativeQuery = true)
    List<Detection> findByRelevanceIdList(List<String> relevanceIdList);
}
